Skip to content

BACKPORT: media: iris/venus: AV1 decode enablement and EOS quirk fix#308

Open
gouravk-qualcomm wants to merge 6 commits intoqualcomm-linux:qcom-6.18.yfrom
gouravk-qualcomm:backport-iris-venus-av1-v3
Open

BACKPORT: media: iris/venus: AV1 decode enablement and EOS quirk fix#308
gouravk-qualcomm wants to merge 6 commits intoqualcomm-linux:qcom-6.18.yfrom
gouravk-qualcomm:backport-iris-venus-av1-v3

Conversation

@gouravk-qualcomm
Copy link

Backport media changes required to enable AV1 decode support on Qualcomm Iris,
along with a Venus VDEC quirk fix.

This series backports the following patches:

  • media: venus: vdec: restrict EOS address quirk to IRIS2 only
  • media: iris: add AV1 format support in the decoder
  • media: iris: define AV1-specific platform capabilities and properties
  • media: iris: add internal buffer calculation for AV1 decoder
  • media: uapi/v4l2/docs: add AV1 stateful decoder support and format description

CRs-Fixed: 4446314

@gouravk-qualcomm gouravk-qualcomm force-pushed the backport-iris-venus-av1-v3 branch from 575ab14 to fe15b66 Compare February 25, 2026 18:45
dmadival and others added 6 commits February 26, 2026 09:41
Implement internal buffer count and size calculations for AV1 decoder
for all the buffer types required by the AV1 decoder, including BIN,
COMV, PERSIST, LINE, and PARTIAL.

This ensures the hardware decoder has properly allocated memory for AV1
decoding operations, enabling correct AV1 video playback.

Link: https://lore.kernel.org/all/20251210-av1d_stateful_v3-v10-5-cf4379a3dcff@oss.qualcomm.com/
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Signed-off-by: Deepa Guthyappa Madivalara <deepa.madivalara@oss.qualcomm.com>
Tested-by: Val Packett <val@packett.cool>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
(cherry picked from commit 819fcf0)
Extend iris decoder driver to support format V4L2_PIX_FMT_AV1.
This change updates the format enumeration (VIDIOC_ENUM_FMT)
and allows setting AV1 format via VIDIOC_S_FMT for gen2 and beyond.
Gen1 iris hardware decoder does not support AV1 format.

Link: https://lore.kernel.org/all/20251210-av1d_stateful_v3-v10-3-cf4379a3dcff@oss.qualcomm.com/
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Signed-off-by: Deepa Guthyappa Madivalara <deepa.madivalara@oss.qualcomm.com>
Tested-by: Val Packett <val@packett.cool>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
(cherry picked from commit 10ac84a)
…properties

Defining platform specific capabilities specific to AV1 decoder.
Set and subscribe to manadatory properties to firmware for AV1.

Link: https://lore.kernel.org/all/20251210-av1d_stateful_v3-v10-4-cf4379a3dcff@oss.qualcomm.com/
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Signed-off-by: Deepa Guthyappa Madivalara <deepa.madivalara@oss.qualcomm.com>
Tested-by: Val Packett <val@packett.cool>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
(cherry picked from commit 2af481a)
On SM8250 (IRIS2) with firmware older than 1.0.087, the firmware could
not handle a dummy device address for EOS buffers, so a NULL device
address is sent instead. The existing check used IS_V6() alongside a
firmware version gate:

    if (IS_V6(core) && is_fw_rev_or_older(core, 1, 0, 87))
        fdata.device_addr = 0;
    else
	fdata.device_addr = 0xdeadb000;

However, SC7280 which is also V6, uses a firmware string of the form
"1.0.<commit-hash>", which the version parser translates to 1.0.0. This
unintentionally satisfies the `is_fw_rev_or_older(..., 1, 0, 87)`
condition on SC7280. Combined with IS_V6() matching there as well, the
quirk is incorrectly applied to SC7280, causing VP9 decode failures.

Constrain the check to IRIS2 (SM8250) only, which is the only platform
that needed this quirk, by replacing IS_V6() with IS_IRIS2(). This
restores correct behavior on SC7280 (no forced NULL EOS buffer address).

Link: https://lore.kernel.org/linux-arm-msm/20251125-venus-vp9-fix-v2-1-8bfcea128b95@oss.qualcomm.com/
Fixes: 47f867c ("media: venus: fix EOS handling in decoder stop command")
Cc: stable@vger.kernel.org
Reported-by: Mecid <mecid@mecomediagroup.de>
Closes: qualcomm-linux/kernel-topics#222
Co-developed-by: Renjiang Han <renjiang.han@oss.qualcomm.com>
Signed-off-by: Renjiang Han <renjiang.han@oss.qualcomm.com>
Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Tested-by: Renjiang Han <renjiang.han@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
(cherry picked from commit 63c072e)
Introduce a new pixel format, V4L2_PIX_FMT_AV1, to the
Video4Linux2(V4L2) API. This format is intended for AV1
bitstreams in stateful decoding/encoding workflows.
The fourcc code 'AV10' is used to distinguish
this format from the existing V4L2_PIX_FMT_AV1_FRAME,
which is used for stateless AV1 decoder implementation.

Link: https://lore.kernel.org/all/20251210-av1d_stateful_v3-v10-1-cf4379a3dcff@oss.qualcomm.com/
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Deepa Guthyappa Madivalara <deepa.madivalara@oss.qualcomm.com>
Tested-by: Val Packett <val@packett.cool>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
(cherry picked from commit 406fc2e)
…ll_fmtdesc()

Add a descriptive string for the AV1 pixel format to v4l_fill_fmtdesc(),
enabling proper reporting of AV1 support via VIDIOC_ENUM_FMT.

Link: https://lore.kernel.org/all/20251210-av1d_stateful_v3-v10-2-cf4379a3dcff@oss.qualcomm.com/
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Deepa Guthyappa Madivalara <deepa.madivalara@oss.qualcomm.com>
Tested-by: Val Packett <val@packett.cool>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
(cherry picked from commit 1510965)
@gouravk-qualcomm gouravk-qualcomm force-pushed the backport-iris-venus-av1-v3 branch from fe15b66 to e1ba742 Compare February 26, 2026 04:13
@qcomlnxci
Copy link

Test Matrix

Test Case kaanapali-mtp lemans-evk monaco-evk qcs615-ride qcs6490-rb3gen2 qcs8300-ride qcs9100-ride-r3 sm8750-mtp x1e80100-crd
0_qcom-next-ci-premerge-tests ◻️ ◻️ ◻️ ◻️ ◻️ ◻️ ◻️ ❌ Fail ◻️
BT_FW_KMD_Service ◻️ ❌ Fail ❌ Fail ◻️ ✅ Pass ✅ Pass ✅ Pass ❌ Fail ◻️
BT_ON_OFF ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ⚠️ skip ◻️
BT_SCAN ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ⚠️ skip ◻️
CPUFreq_Validation ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
CPU_affinity ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
DSP_AudioPD ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ◻️
Ethernet ◻️ ⚠️ skip ⚠️ skip ◻️ ⚠️ skip ⚠️ skip ⚠️ skip ⚠️ skip ◻️
Freq_Scaling ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ❌ Fail ◻️
GIC ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
IPA ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
Interrupts ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
OpenCV ◻️ ⚠️ skip ⚠️ skip ◻️ ⚠️ skip ⚠️ skip ⚠️ skip ◻️ ◻️
PCIe ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
Probe_Failure_Check ◻️ ❌ Fail ❌ Fail ◻️ ✅ Pass ✅ Pass ✅ Pass ❌ Fail ◻️
RMNET ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
UFS_Validation ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
USBHost ◻️ ❌ Fail ❌ Fail ◻️ ❌ Fail ✅ Pass ✅ Pass ❌ Fail ◻️
WiFi_Firmware_Driver ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ◻️
WiFi_OnOff ◻️ ✅ Pass ⚠️ skip ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ◻️
cdsp_remoteproc ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ❌ Fail ◻️
hotplug ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
irq ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
kaslr ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
pinctrl ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
qcom_hwrng ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ◻️
remoteproc ◻️ ✅ Pass ❌ Fail ◻️ ✅ Pass ❌ Fail ✅ Pass ❌ Fail ◻️
rngtest ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
shmbridge ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
smmu ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️
watchdog ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ◻️
wpss_remoteproc ◻️ ✅ Pass ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ✅ Pass ◻️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants